<?php  if (!defined('BASEPATH')) exit('No direct script access allowed');
/**
 * Code Igniter
 *
 *
 * @package		Account
 * @author		Dennis T. Kaplan
 * @copyright	Copyright (c) 2007, Orces, Inc.
 * @license		
 * @link			http://www.pzzazz.com
 * @since		Version 1.0
 * @category	Libraries
 * @filesource
 */

class Emails 
{
	/**
	* Constructor
	*
	*/	
	function Emails()
	{
		//$this->CI=& get_instance();
		
		log_message('debug', "Emails Class Initialized");
	}
	
	
    function Activate($id, $alias, $email, $key)
    {
		 $host = $_SERVER['HTTP_HOST'];
		 $url = site_url('auth/activation/'.$id.'/'.$key);
		 
		 $subject= "Your " .$host. " activaten key.";
		 $message = 
		 "Welcome to " .$host. "\r\n\r\n"
		 ."To activate your account, please click "
		 ."on the following link and enter your Activation code:\r\n\r\n"
		 ."Activation code: " .$key. "\r\n\r\n"
		 .$url."\r\n\r\n\r\n"
		 ."If you have received this mail in error, "
		 ."you do not need to take any action to cancel the account. \r\n"
		 ."The account has not be created, "
		 ."the information we have will be deleted from our server periodically, "
		 ."and you will not receive any further emails. \r\n\r\n"
		 ."Thank you for using " .$host. ".\r\n\r\n"
		 ."This is a post-only mailing. "
		 ."Replies to this message are not monitored or answered.";
		 
		 $this->fun->SendEmail($email, $subject , $message);
    }

    function SendPass($alias, $email, $pass)
    {
		 $host = $_SERVER['HTTP_HOST'];
		 
		 $subject= "Your " .$host. " login info.";
		 $message = 
		 "Welcome back to " .$host. "\r\n\r\n"
		 ."You already have an account with us "
		 ."following is your login information:\r\n\r\n"
		 ."Alias: " .$alias. "\r\n"
		 ."Password: " .$pass. "\r\n"
		 ."http://".$host. "\r\n\r\n\r\n"
		 ."If you have received this mail in error, "
		 ."you do not need to take any action. \r\n"
		 ."You will not receive any further emails. \r\n\r\n"
		 ."Thank you for using " .$host. ".\r\n\r\n"
		 ."This is a post-only mailing. "
		 ."Replies to this message are not monitored or answered.";
		 
		 $this->fun->SendEmail($email, $subject , $message);
    }



}

?>
